#! /bin/bash
datehour=`date +%Y-%m-%d-%H --date='1 hours ago'`
sh /alidata1/shell/download.sh '10.163.12.183' 'root' 'widubgt5mko0!@#' `date +%Y-%m-%d-%H --date='1 hours ago'`
mv /alidata1/shell/logger/pv/pv.log.$datehour  /alidata1/shell/logger/pv/pv.log.183.$datehour
mv /alidata1/shell/logger/request/request.log.$datehour  /alidata1/shell/logger/request/request.log.183.$datehour
mv /alidata1/shell/logger/show/show.log.$datehour  /alidata1/shell/logger/show/show.log.183.$datehour
mv /alidata1/shell/logger/click/click.log.$datehour  /alidata1/shell/logger/click/click.log.183.$datehour
mv /alidata1/shell/logger/activate/activate.log.$datehour  /alidata1/shell/logger/activate/activate.log.183.$datehour
awk -f /alidata1/shell/awk/request.awk /alidata1/shell/logger/request/request.log.183.$datehour >/alidata1/shell/logger/request/request.log.$datehour
awk -f /alidata1/shell/awk/show.awk /alidata1/shell/logger/show/show.log.183.$datehour >/alidata1/shell/logger/show/show.log.$datehour
awk -f /alidata1/shell/awk/click.awk /alidata1/shell/logger/click/click.log.183.$datehour >/alidata1/shell/logger/click/click.log.$datehour
awk -f /alidata1/shell/awk/activate.awk /alidata1/shell/logger/activate/activate.log.183.$datehour >/alidata1/shell/logger/activate/activate.log.$datehour
rm -f /alidata1/shell/logger/request/request.log.183.$datehour
rm -f /alidata1/shell/logger/show/show.log.183.$datehour
rm -f /alidata1/shell/logger/click/click.log.183.$datehour
rm -f /alidata1/shell/logger/activate/activate.log.183.$datehour
curl "http://112.126.68.198:8081/data_engine/hour.do?datehour=$datehour" 
